#include <stdio.h>

void swap(int *p1, int *p2){
	int tmp;
	tmp = *p1;
	*p1 = *p2;
	*p2 = tmp;
}

void quickSort(int* arr, int left, int right){
    if(left >= right)
        return;
    int prev = left, cur = prev + 1;
    int pivot = arr[left];
    while(cur <= right){
        if(arr[cur] < pivot && ++prev != cur){
            swap(&arr[cur], &arr[prev]);
        }
        cur++;
    }
    swap(&arr[left], &arr[prev]);
    quickSort(arr, left, prev - 1);
    quickSort(arr, prev + 1, right);
}

/***** Begin *****/
int main()
{
    int n;
    scanf("%d", &n);
    int arr[1005];
    for(int i = 0; i < n; i++){
        scanf("%d", &arr[i]);
    }
    quickSort(arr, 0, n - 1);
    for(int i = 0; i < n - 1; i++){
        printf("%d ", arr[i]);
    }
    printf("%d", arr[n - 1]);
	return 0;
}
/***** End *****/